import bpy

from bpy.types import Node
from bpy.props import StringProperty
from .._base.node_base import ScNode
from .._base.node_input import ScInputNode
from ...helper import focus_on_object

class ScReceiveFromSverchok(Node, ScInputNode):
    bl_idname = "ScReceiveFromSverchok"
    bl_label = "Receive from Sverchok"

    prop_verts: StringProperty(default='''[[
        [0.0, 1.0, -0.05000000074505806],
        [0.0, 1.0, 0.05000000074505806],
        [0.0980171412229538, 0.9951847195625305, -0.05000000074505806],
        [0.0980171412229538, 0.9951847195625305, 0.05000000074505806],
        [0.19509032368659973, 0.9807852506637573, -0.05000000074505806],
        [0.19509032368659973, 0.9807852506637573, 0.05000000074505806],
        [0.2902846932411194, 0.9569403529167175, -0.05000000074505806],
        [0.2902846932411194, 0.9569403529167175, 0.05000000074505806],
        [0.3826834559440613, 0.9238795042037964, -0.05000000074505806],
        [0.3826834559440613, 0.9238795042037964, 0.05000000074505806],
        [0.4713967442512512, 0.8819212317466736, -0.05000000074505806],
        [0.4713967442512512, 0.8819212317466736, 0.05000000074505806],
        [0.5555702447891235, 0.8314695954322815, -0.05000000074505806],
        [0.5555702447891235, 0.8314695954322815, 0.05000000074505806],
        [0.6343932747840881, 0.7730104923248291, -0.05000000074505806],
        [0.6343932747840881, 0.7730104923248291, 0.05000000074505806],
        [0.7071067690849304, 0.7071068286895752, -0.05000000074505806],
        [0.7071067690849304, 0.7071068286895752, 0.05000000074505806],
        [0.7730104327201843, 0.6343933343887329, -0.05000000074505806],
        [0.7730104327201843, 0.6343933343887329, 0.05000000074505806],
        [0.8314695954322815, 0.5555703043937683, -0.05000000074505806],
        [0.8314695954322815, 0.5555703043937683, 0.05000000074505806],
        [0.9238795042037964, 0.3826834261417389, -0.05000000074505806],
        [0.9238795042037964, 0.3826834261417389, 0.05000000074505806],
        [0.9569403529167175, 0.2902846336364746, -0.05000000074505806],
        [0.9569403529167175, 0.2902846336364746, 0.05000000074505806],
        [0.9807853102684021, 0.19509023427963257, -0.05000000074505806],
        [0.9807853102684021, 0.19509023427963257, 0.05000000074505806],
        [0.9951847195625305, 0.09801701456308365, -0.05000000074505806],
        [0.9951847195625305, 0.09801701456308365, 0.05000000074505806],
        [-0.9951847791671753, 0.09801647812128067, -0.05000000074505806],
        [-0.9951847791671753, 0.09801647812128067, 0.05000000074505806],
        [-0.9807854294776917, 0.19508947432041168, -0.05000000074505806],
        [-0.9807854294776917, 0.19508947432041168, 0.05000000074505806],
        [-0.9569406509399414, 0.2902836501598358, -0.05000000074505806],
        [-0.9569406509399414, 0.2902836501598358, 0.05000000074505806],
        [-0.9238800406455994, 0.38268226385116577, -0.05000000074505806],
        [-0.9238800406455994, 0.38268226385116577, 0.05000000074505806],
        [-0.8819219470024109, 0.47139546275138855, -0.05000000074505806],
        [-0.8819219470024109, 0.47139546275138855, 0.05000000074505806],
        [-0.8314705491065979, 0.5555688738822937, -0.05000000074505806],
        [-0.8314705491065979, 0.5555688738822937, 0.05000000074505806],
        [-0.7730116248130798, 0.6343918442726135, -0.05000000074505806],
        [-0.7730116248130798, 0.6343918442726135, 0.05000000074505806],
        [-0.7071082592010498, 0.7071053385734558, -0.05000000074505806],
        [-0.7071082592010498, 0.7071053385734558, 0.05000000074505806],
        [-0.6343950033187866, 0.7730090022087097, -0.05000000074505806],
        [-0.6343950033187866, 0.7730090022087097, 0.05000000074505806],
        [-0.5555722713470459, 0.8314682245254517, -0.05000000074505806],
        [-0.5555722713470459, 0.8314682245254517, 0.05000000074505806],
        [-0.47139906883239746, 0.8819200396537781, -0.05000000074505806],
        [-0.47139906883239746, 0.8819200396537781, 0.05000000074505806],
        [-0.382686048746109, 0.9238784313201904, -0.05000000074505806],
        [-0.382686048746109, 0.9238784313201904, 0.05000000074505806],
        [-0.290287584066391, 0.9569394588470459, -0.05000000074505806],
        [-0.290287584066391, 0.9569394588470459, 0.05000000074505806],
        [-0.19509349763393402, 0.9807846546173096, -0.05000000074505806],
        [-0.19509349763393402, 0.9807846546173096, 0.05000000074505806],
        [-0.09802056849002838, 0.9951843619346619, -0.05000000074505806],
        [-0.09802056849002838, 0.9951843619346619, 0.05000000074505806],
        [0.877077043056488, 0.4631164073944092, -0.04999999701976776],
        [0.8856300115585327, 0.4635552167892456, -0.05000000074505806],
        [0.8856300115585327, 0.4635552167892456, 0.05000000074505806],
        [0.8770769834518433, 0.4631164073944092, 0.04999998211860657],
        [0.75844806432724, 0.45302614569664, -0.050000011920928955],
        [0.75844806432724, 0.4530261158943176, 0.04999999701976776],
        [0.7497192025184631, 0.5350630879402161, -0.050000011920928955],
        [0.7497192025184631, 0.5350630879402161, 0.04999999701976776],
        [0.8391964435577393, 0.5426788330078125, -0.05000000074505806],
        [0.8391964435577393, 0.5426788330078125, 0.05000000074505806],
        [0.6409949064254761, 0.4380180835723877, -0.050000011920928955],
        [0.6409949064254761, 0.43801814317703247, 0.04999999701976776],
        [0.6284582614898682, 0.5195600390434265, -0.050000011920928955],
        [0.6284582614898682, 0.5195600390434265, 0.04999999701976776],
        [0.5248669385910034, 0.4171338975429535, -0.04999999701976776],
        [0.5248669385910034, 0.4171339273452759, 0.04999998211860657],
        [0.5078641176223755, 0.4978627860546112, -0.04999999701976776],
        [0.5078641176223755, 0.4978627860546112, 0.04999998211860657],
        [0.41011661291122437, 0.3893965780735016, -0.04999999701976776],
        [0.410116583108902, 0.3893965780735016, 0.04999998211860657],
        [0.38821667432785034, 0.4689367711544037, -0.04999999701976776],
        [0.38821670413017273, 0.4689367413520813, 0.04999998211860657],
        [0.29643815755844116, 0.3542042672634125, -0.04999999701976776],
        [0.29643815755844116, 0.3542042672634125, 0.04999998211860657],
        [0.2700721025466919, 0.4323776662349701, -0.04999999701976776],
        [0.2700721025466919, 0.4323776364326477, 0.04999998211860657],
        [0.1834145188331604, 0.312884658575058, -0.04999999701976776],
        [0.1834145188331604, 0.312884658575058, 0.04999998211860657],
        [0.15377283096313477, 0.3898756504058838, -0.04999999701976776],
        [0.15377283096313477, 0.38987571001052856, 0.04999998211860657],
        [0.07093551754951477, 0.2673548758029938, -0.04999999701976776],
        [0.07093551754951477, 0.2673548758029938, 0.04999998211860657],
        [0.03927268087863922, 0.34353700280189514, -0.04999999701976776],
        [0.03927268087863922, 0.34353697299957275, 0.04999998211860657],
        [-0.04104405641555786, 0.2195846140384674, -0.04999999701976776],
        [-0.04104405641555786, 0.2195846140384674, 0.04999998211860657],
        [-0.07353941351175308, 0.29541537165641785, -0.04999999701976776],
        [-0.07353941351175308, 0.29541537165641785, 0.04999998211860657],
        [-0.15259625017642975, 0.17156541347503662, -0.04999999701976776],
        [-0.15259625017642975, 0.17156541347503662, 0.04999998211860657],
        [-0.18474765121936798, 0.2475426197052002, -0.04999999701976776],
        [-0.18474765121936798, 0.2475426197052002, 0.04999998211860657],
        [-0.2638249397277832, 0.1253080666065216, -0.04999999701976776],
        [-0.2638249397277832, 0.1253080666065216, 0.04999998211860657],
        [-0.2944043278694153, 0.20193150639533997, -0.04999999701976776],
        [-0.2944043278694153, 0.20193150639533997, 0.04999998211860657],
        [-0.3748677968978882, 0.08284654468297958, -0.04999999701976776],
        [-0.3748677968978882, 0.08284654468297958, 0.04999998211860657],
        [-0.40252816677093506, 0.16057142615318298, -0.04999999701976776],
        [-0.40252816677093506, 0.16057142615318298, 0.04999998211860657],
        [-0.48580679297447205, 0.046275392174720764, 0.04999998211860657],
        [-0.48580679297447205, 0.046275392174720764, -0.04999999701976776],
        [-0.5091933608055115, 0.12539125978946686, 0.04999998211860657],
        [-0.5091933608055115, 0.12539125978946686, -0.04999999701976776],
        [-0.5963599681854248, 0.017299987375736237, 0.04999998211860657],
        [-0.5963599681854248, 0.017299987375736237, -0.04999999701976776],
        [-0.6148414611816406, 0.09770326316356659, 0.04999998211860657],
        [-0.6148414611816406, 0.09770326316356659, -0.04999999701976776],
        [-0.720008373260498, 0.0768759548664093, 0.04999998211860657],
        [-0.720008373260498, 0.0768759548664093, -0.04999999701976776],
        [-0.8249285817146301, 0.06191518157720566, 0.04999998211860657],
        [-0.8249285817146301, 0.06191518157720566, -0.04999999701976776],
        [-0.9297371506690979, 0.051856838166713715, -0.04999999701976776],
        [-0.9297371506690979, 0.051856838166713715, 0.04999998211860657],
        [-0.9976472854614258, 0.047891177237033844, -0.05000000074505806],
        [-0.997647225856781, 0.04789118468761444, 0.04999999701976776],
        [0.0, -1.0, -0.05000000074505806],
        [0.0, -1.0, 0.05000000074505806],
        [0.0980171412229538, -0.9951847195625305, -0.05000000074505806],
        [0.0980171412229538, -0.9951847195625305, 0.05000000074505806],
        [0.19509032368659973, -0.9807852506637573, -0.05000000074505806],
        [0.19509032368659973, -0.9807852506637573, 0.05000000074505806],
        [0.2902846932411194, -0.9569403529167175, -0.05000000074505806],
        [0.2902846932411194, -0.9569403529167175, 0.05000000074505806],
        [0.3826834559440613, -0.9238795042037964, -0.05000000074505806],
        [0.3826834559440613, -0.9238795042037964, 0.05000000074505806],
        [0.4713967442512512, -0.8819212317466736, -0.05000000074505806],
        [0.4713967442512512, -0.8819212317466736, 0.05000000074505806],
        [0.5555702447891235, -0.8314695954322815, -0.05000000074505806],
        [0.5555702447891235, -0.8314695954322815, 0.05000000074505806],
        [0.6343932747840881, -0.7730104923248291, -0.05000000074505806],
        [0.6343932747840881, -0.7730104923248291, 0.05000000074505806],
        [0.7071067690849304, -0.7071068286895752, -0.05000000074505806],
        [0.7071067690849304, -0.7071068286895752, 0.05000000074505806],
        [0.7730104327201843, -0.6343933343887329, -0.05000000074505806],
        [0.7730104327201843, -0.6343933343887329, 0.05000000074505806],
        [0.8314695954322815, -0.5555703043937683, -0.05000000074505806],
        [0.8314695954322815, -0.5555703043937683, 0.05000000074505806],
        [0.9238795042037964, -0.3826834261417389, -0.05000000074505806],
        [0.9238795042037964, -0.3826834261417389, 0.05000000074505806],
        [0.9569403529167175, -0.2902846336364746, -0.05000000074505806],
        [0.9569403529167175, -0.2902846336364746, 0.05000000074505806],
        [0.9807853102684021, -0.19509023427963257, -0.05000000074505806],
        [0.9807853102684021, -0.19509023427963257, 0.05000000074505806],
        [0.9951847195625305, -0.09801701456308365, -0.05000000074505806],
        [0.9951847195625305, -0.09801701456308365, 0.05000000074505806],
        [1.0, 0.0, -0.05000000074505806],
        [1.0, 0.0, 0.05000000074505806],
        [-0.9951847791671753, -0.09801647812128067, -0.05000000074505806],
        [-0.9951847791671753, -0.09801647812128067, 0.05000000074505806],
        [-0.9807854294776917, -0.19508947432041168, -0.05000000074505806],
        [-0.9807854294776917, -0.19508947432041168, 0.05000000074505806],
        [-0.9569406509399414, -0.2902836501598358, -0.05000000074505806],
        [-0.9569406509399414, -0.2902836501598358, 0.05000000074505806],
        [-0.9238800406455994, -0.38268226385116577, -0.05000000074505806],
        [-0.9238800406455994, -0.38268226385116577, 0.05000000074505806],
        [-0.8819219470024109, -0.47139546275138855, -0.05000000074505806],
        [-0.8819219470024109, -0.47139546275138855, 0.05000000074505806],
        [-0.8314705491065979, -0.5555688738822937, -0.05000000074505806],
        [-0.8314705491065979, -0.5555688738822937, 0.05000000074505806],
        [-0.7730116248130798, -0.6343918442726135, -0.05000000074505806],
        [-0.7730116248130798, -0.6343918442726135, 0.05000000074505806],
        [-0.7071082592010498, -0.7071053385734558, -0.05000000074505806],
        [-0.7071082592010498, -0.7071053385734558, 0.05000000074505806],
        [-0.6343950033187866, -0.7730090022087097, -0.05000000074505806],
        [-0.6343950033187866, -0.7730090022087097, 0.05000000074505806],
        [-0.5555722713470459, -0.8314682245254517, -0.05000000074505806],
        [-0.5555722713470459, -0.8314682245254517, 0.05000000074505806],
        [-0.47139906883239746, -0.8819200396537781, -0.05000000074505806],
        [-0.47139906883239746, -0.8819200396537781, 0.05000000074505806],
        [-0.382686048746109, -0.9238784313201904, -0.05000000074505806],
        [-0.382686048746109, -0.9238784313201904, 0.05000000074505806],
        [-0.290287584066391, -0.9569394588470459, -0.05000000074505806],
        [-0.290287584066391, -0.9569394588470459, 0.05000000074505806],
        [-0.19509349763393402, -0.9807846546173096, -0.05000000074505806],
        [-0.19509349763393402, -0.9807846546173096, 0.05000000074505806],
        [-0.09802056849002838, -0.9951843619346619, -0.05000000074505806],
        [-0.09802056849002838, -0.9951843619346619, 0.05000000074505806],
        [0.877077043056488, -0.4631164073944092, -0.04999999701976776],
        [0.8856300115585327, -0.4635552167892456, -0.05000000074505806],
        [0.8856300115585327, -0.4635552167892456, 0.05000000074505806],
        [0.8770769834518433, -0.4631164073944092, 0.04999998211860657],
        [0.75844806432724, -0.45302614569664, -0.050000011920928955],
        [0.75844806432724, -0.4530261158943176, 0.04999999701976776],
        [0.7497192025184631, -0.5350630879402161, -0.050000011920928955],
        [0.7497192025184631, -0.5350630879402161, 0.04999999701976776],
        [0.8391964435577393, -0.5426788330078125, -0.05000000074505806],
        [0.8391964435577393, -0.5426788330078125, 0.05000000074505806],
        [0.6409949064254761, -0.4380180835723877, -0.050000011920928955],
        [0.6409949064254761, -0.43801814317703247, 0.04999999701976776],
        [0.6284582614898682, -0.5195600390434265, -0.050000011920928955],
        [0.6284582614898682, -0.5195600390434265, 0.04999999701976776],
        [0.5248669385910034, -0.4171338975429535, -0.04999999701976776],
        [0.5248669385910034, -0.4171339273452759, 0.04999998211860657],
        [0.5078641176223755, -0.4978627860546112, -0.04999999701976776],
        [0.5078641176223755, -0.4978627860546112, 0.04999998211860657],
        [0.41011661291122437, -0.3893965780735016, -0.04999999701976776],
        [0.410116583108902, -0.3893965780735016, 0.04999998211860657],
        [0.38821667432785034, -0.4689367711544037, -0.04999999701976776],
        [0.38821670413017273, -0.4689367413520813, 0.04999998211860657],
        [0.29643815755844116, -0.3542042672634125, -0.04999999701976776],
        [0.29643815755844116, -0.3542042672634125, 0.04999998211860657],
        [0.2700721025466919, -0.4323776662349701, -0.04999999701976776],
        [0.2700721025466919, -0.4323776364326477, 0.04999998211860657],
        [0.1834145188331604, -0.312884658575058, -0.04999999701976776],
        [0.1834145188331604, -0.312884658575058, 0.04999998211860657],
        [0.15377283096313477, -0.3898756504058838, -0.04999999701976776],
        [0.15377283096313477, -0.38987571001052856, 0.04999998211860657],
        [0.07093551754951477, -0.2673548758029938, -0.04999999701976776],
        [0.07093551754951477, -0.2673548758029938, 0.04999998211860657],
        [0.03927268087863922, -0.34353700280189514, -0.04999999701976776],
        [0.03927268087863922, -0.34353697299957275, 0.04999998211860657],
        [-0.04104405641555786, -0.2195846140384674, -0.04999999701976776],
        [-0.04104405641555786, -0.2195846140384674, 0.04999998211860657],
        [-0.07353941351175308, -0.29541537165641785, -0.04999999701976776],
        [-0.07353941351175308, -0.29541537165641785, 0.04999998211860657],
        [-0.15259625017642975, -0.17156541347503662, -0.04999999701976776],
        [-0.15259625017642975, -0.17156541347503662, 0.04999998211860657],
        [-0.18474765121936798, -0.2475426197052002, -0.04999999701976776],
        [-0.18474765121936798, -0.2475426197052002, 0.04999998211860657],
        [-0.2638249397277832, -0.1253080666065216, -0.04999999701976776],
        [-0.2638249397277832, -0.1253080666065216, 0.04999998211860657],
        [-0.2944043278694153, -0.20193150639533997, -0.04999999701976776],
        [-0.2944043278694153, -0.20193150639533997, 0.04999998211860657],
        [-0.3748677968978882, -0.08284654468297958, -0.04999999701976776],
        [-0.3748677968978882, -0.08284654468297958, 0.04999998211860657],
        [-0.40252816677093506, -0.16057142615318298, -0.04999999701976776],
        [-0.40252816677093506, -0.16057142615318298, 0.04999998211860657],
        [-0.48580679297447205, -0.046275392174720764, 0.04999998211860657],
        [-0.48580679297447205, -0.046275392174720764, -0.04999999701976776],
        [-0.5091933608055115, -0.12539125978946686, 0.04999998211860657],
        [-0.5091933608055115, -0.12539125978946686, -0.04999999701976776],
        [-0.5963599681854248, -0.017299987375736237, 0.04999998211860657],
        [-0.5963599681854248, -0.017299987375736237, -0.04999999701976776],
        [-0.6148414611816406, -0.09770326316356659, 0.04999998211860657],
        [-0.6148414611816406, -0.09770326316356659, -0.04999999701976776],
        [-0.720008373260498, -0.0768759548664093, 0.04999998211860657],
        [-0.720008373260498, -0.0768759548664093, -0.04999999701976776],
        [-0.8249285817146301, -0.06191518157720566, 0.04999998211860657],
        [-0.8249285817146301, -0.06191518157720566, -0.04999999701976776],
        [-0.9297371506690979, -0.051856838166713715, -0.04999999701976776],
        [-0.9297371506690979, -0.051856838166713715, 0.04999998211860657],
        [-0.9976472854614258, -0.047891177237033844, -0.05000000074505806],
        [-0.997647225856781, -0.04789118468761444, 0.04999999701976776],
        [-0.6836816072463989, 0.0, 0.04999998211860657],
        [-0.6836816072463989, 0.0, -0.04999999701976776]
    ]]''')
    prop_edges: StringProperty(default='''[[
        [0, 2],
        [1, 3],
        [0, 1],
        [2, 3],
        [2, 4],
        [3, 5],
        [4, 5],
        [4, 6],
        [5, 7],
        [6, 7],
        [6, 8],
        [7, 9],
        [8, 9],
        [8, 10],
        [9, 11],
        [10, 11],
        [10, 12],
        [11, 13],
        [12, 13],
        [12, 14],
        [13, 15],
        [14, 15],
        [14, 16],
        [15, 17],
        [16, 17],
        [16, 18],
        [17, 19],
        [18, 19],
        [18, 20],
        [19, 21],
        [20, 21],
        [21, 69],
        [22, 61],
        [22, 23],
        [22, 24],
        [23, 25],
        [24, 25],
        [24, 26],
        [25, 27],
        [26, 27],
        [26, 28],
        [27, 29],
        [28, 29],
        [28, 156],
        [29, 157],
        [156, 157],
        [30, 124],
        [30, 31],
        [30, 32],
        [31, 33],
        [32, 33],
        [32, 34],
        [33, 35],
        [34, 35],
        [34, 36],
        [35, 37],
        [36, 37],
        [36, 38],
        [37, 39],
        [38, 39],
        [38, 40],
        [39, 41],
        [40, 41],
        [40, 42],
        [41, 43],
        [42, 43],
        [42, 44],
        [43, 45],
        [44, 45],
        [44, 46],
        [45, 47],
        [46, 47],
        [46, 48],
        [47, 49],
        [48, 49],
        [48, 50],
        [49, 51],
        [50, 51],
        [50, 52],
        [51, 53],
        [52, 53],
        [52, 54],
        [53, 55],
        [54, 55],
        [54, 56],
        [55, 57],
        [56, 57],
        [56, 58],
        [57, 59],
        [58, 59],
        [0, 58],
        [1, 59],
        [60, 61],
        [62, 63],
        [61, 62],
        [60, 64],
        [63, 65],
        [66, 68],
        [67, 69],
        [68, 69],
        [64, 70],
        [65, 71],
        [67, 73],
        [66, 72],
        [70, 74],
        [71, 75],
        [73, 77],
        [72, 76],
        [74, 78],
        [75, 79],
        [76, 80],
        [77, 81],
        [79, 83],
        [78, 82],
        [81, 85],
        [80, 84],
        [82, 86],
        [83, 87],
        [84, 88],
        [85, 89],
        [87, 91],
        [86, 90],
        [88, 92],
        [89, 93],
        [90, 94],
        [91, 95],
        [92, 96],
        [93, 97],
        [94, 98],
        [95, 99],
        [96, 100],
        [97, 101],
        [98, 102],
        [99, 103],
        [100, 104],
        [101, 105],
        [102, 106],
        [103, 107],
        [104, 108],
        [105, 109],
        [106, 111],
        [107, 110],
        [109, 112],
        [108, 113],
        [111, 115],
        [110, 114],
        [113, 117],
        [112, 116],
        [114, 254],
        [115, 255],
        [116, 118],
        [117, 119],
        [119, 121],
        [118, 120],
        [121, 122],
        [120, 123],
        [124, 125],
        [122, 124],
        [123, 125],
        [31, 125],
        [116, 117],
        [20, 68],
        [82, 83],
        [108, 109],
        [74, 75],
        [100, 101],
        [64, 65],
        [92, 93],
        [110, 111],
        [23, 62],
        [84, 85],
        [102, 103],
        [76, 77],
        [122, 123],
        [94, 95],
        [66, 67],
        [118, 119],
        [86, 87],
        [112, 113],
        [78, 79],
        [104, 105],
        [70, 71],
        [96, 97],
        [60, 63],
        [114, 115],
        [88, 89],
        [106, 107],
        [80, 81],
        [98, 99],
        [72, 73],
        [120, 121],
        [90, 91],
        [254, 255],
        [157, 254],
        [156, 255],
        [126, 128],
        [127, 129],
        [126, 127],
        [128, 129],
        [128, 130],
        [129, 131],
        [130, 131],
        [130, 132],
        [131, 133],
        [132, 133],
        [132, 134],
        [133, 135],
        [134, 135],
        [134, 136],
        [135, 137],
        [136, 137],
        [136, 138],
        [137, 139],
        [138, 139],
        [138, 140],
        [139, 141],
        [140, 141],
        [140, 142],
        [141, 143],
        [142, 143],
        [142, 144],
        [143, 145],
        [144, 145],
        [144, 146],
        [145, 147],
        [146, 147],
        [147, 197],
        [148, 189],
        [148, 149],
        [148, 150],
        [149, 151],
        [150, 151],
        [150, 152],
        [151, 153],
        [152, 153],
        [152, 154],
        [153, 155],
        [154, 155],
        [154, 156],
        [155, 157],
        [158, 252],
        [158, 159],
        [158, 160],
        [159, 161],
        [160, 161],
        [160, 162],
        [161, 163],
        [162, 163],
        [162, 164],
        [163, 165],
        [164, 165],
        [164, 166],
        [165, 167],
        [166, 167],
        [166, 168],
        [167, 169],
        [168, 169],
        [168, 170],
        [169, 171],
        [170, 171],
        [170, 172],
        [171, 173],
        [172, 173],
        [172, 174],
        [173, 175],
        [174, 175],
        [174, 176],
        [175, 177],
        [176, 177],
        [176, 178],
        [177, 179],
        [178, 179],
        [178, 180],
        [179, 181],
        [180, 181],
        [180, 182],
        [181, 183],
        [182, 183],
        [182, 184],
        [183, 185],
        [184, 185],
        [184, 186],
        [185, 187],
        [186, 187],
        [126, 186],
        [127, 187],
        [188, 189],
        [190, 191],
        [189, 190],
        [188, 192],
        [191, 193],
        [194, 196],
        [195, 197],
        [196, 197],
        [192, 198],
        [193, 199],
        [195, 201],
        [194, 200],
        [198, 202],
        [199, 203],
        [201, 205],
        [200, 204],
        [202, 206],
        [203, 207],
        [204, 208],
        [205, 209],
        [207, 211],
        [206, 210],
        [209, 213],
        [208, 212],
        [210, 214],
        [211, 215],
        [212, 216],
        [213, 217],
        [215, 219],
        [214, 218],
        [216, 220],
        [217, 221],
        [218, 222],
        [219, 223],
        [220, 224],
        [221, 225],
        [222, 226],
        [223, 227],
        [224, 228],
        [225, 229],
        [226, 230],
        [227, 231],
        [228, 232],
        [229, 233],
        [230, 234],
        [231, 235],
        [232, 236],
        [233, 237],
        [234, 239],
        [235, 238],
        [237, 240],
        [236, 241],
        [239, 243],
        [238, 242],
        [241, 245],
        [240, 244],
        [242, 254],
        [243, 255],
        [244, 246],
        [245, 247],
        [247, 249],
        [246, 248],
        [249, 250],
        [248, 251],
        [252, 253],
        [250, 252],
        [251, 253],
        [159, 253],
        [244, 245],
        [146, 196],
        [210, 211],
        [236, 237],
        [202, 203],
        [228, 229],
        [192, 193],
        [220, 221],
        [238, 239],
        [149, 190],
        [212, 213],
        [230, 231],
        [204, 205],
        [250, 251],
        [222, 223],
        [194, 195],
        [246, 247],
        [214, 215],
        [240, 241],
        [206, 207],
        [232, 233],
        [198, 199],
        [224, 225],
        [188, 191],
        [242, 243],
        [216, 217],
        [234, 235],
        [208, 209],
        [226, 227],
        [200, 201],
        [248, 249],
        [218, 219]
    ]]''')
    prop_faces: StringProperty(default='''[[
        [0, 1, 3, 2],
        [2, 3, 5, 4],
        [4, 5, 7, 6],
        [6, 7, 9, 8],
        [8, 9, 11, 10],
        [10, 11, 13, 12],
        [12, 13, 15, 14],
        [14, 15, 17, 16],
        [16, 17, 19, 18],
        [18, 19, 21, 20],
        [20, 21, 69, 68],
        [22, 23, 25, 24],
        [24, 25, 27, 26],
        [26, 27, 29, 28],
        [28, 29, 157, 156],
        [30, 31, 33, 32],
        [32, 33, 35, 34],
        [34, 35, 37, 36],
        [36, 37, 39, 38],
        [38, 39, 41, 40],
        [40, 41, 43, 42],
        [42, 43, 45, 44],
        [44, 45, 47, 46],
        [46, 47, 49, 48],
        [48, 49, 51, 50],
        [50, 51, 53, 52],
        [52, 53, 55, 54],
        [54, 55, 57, 56],
        [3, 1, 59, 57, 55, 53, 51, 49, 47, 45, 43, 41, 39, 37, 35, 33, 31, 125, 123, 120, 118, 116, 112, 109, 105, 101, 97, 93, 89, 85, 81, 77, 73, 67, 69, 21, 19, 17, 15, 13, 11, 9, 7, 5],
        [56, 57, 59, 58],
        [58, 59, 1, 0],
        [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 68, 66, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 113, 117, 119, 121, 122, 124, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58],
        [81, 80, 76, 77],
        [98, 99, 95, 94],
        [60, 63, 62, 61],
        [116, 117, 113, 112],
        [61, 62, 23, 22],
        [85, 84, 80, 81],
        [115, 114, 110, 111],
        [97, 96, 92, 93],
        [82, 83, 79, 78],
        [77, 76, 72, 73],
        [93, 92, 88, 89],
        [90, 91, 87, 86],
        [124, 125, 31, 30],
        [105, 104, 100, 101],
        [86, 87, 83, 82],
        [89, 88, 84, 85],
        [73, 72, 66, 67],
        [120, 121, 119, 118],
        [111, 110, 107, 106],
        [123, 122, 121, 120],
        [101, 100, 96, 97],
        [109, 108, 104, 105],
        [64, 65, 63, 60],
        [67, 66, 68, 69],
        [156, 255, 115, 111, 106, 102, 98, 94, 90, 86, 82, 78, 74, 70, 64, 60, 61, 22, 24, 26, 28],
        [70, 71, 65, 64],
        [94, 95, 91, 90],
        [122, 123, 125, 124],
        [112, 113, 108, 109],
        [118, 119, 117, 116],
        [255, 254, 114, 115],
        [106, 107, 103, 102],
        [74, 75, 71, 70],
        [102, 103, 99, 98],
        [78, 79, 75, 74],
        [62, 63, 65, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, 110, 114, 254, 157, 29, 27, 25, 23],
        [126, 128, 129, 127],
        [128, 130, 131, 129],
        [130, 132, 133, 131],
        [132, 134, 135, 133],
        [134, 136, 137, 135],
        [136, 138, 139, 137],
        [138, 140, 141, 139],
        [140, 142, 143, 141],
        [142, 144, 145, 143],
        [144, 146, 147, 145],
        [146, 196, 197, 147],
        [148, 150, 151, 149],
        [150, 152, 153, 151],
        [152, 154, 155, 153],
        [154, 156, 157, 155],
        [158, 160, 161, 159],
        [160, 162, 163, 161],
        [162, 164, 165, 163],
        [164, 166, 167, 165],
        [166, 168, 169, 167],
        [168, 170, 171, 169],
        [170, 172, 173, 171],
        [172, 174, 175, 173],
        [174, 176, 177, 175],
        [176, 178, 179, 177],
        [178, 180, 181, 179],
        [180, 182, 183, 181],
        [182, 184, 185, 183],
        [129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 197, 195, 201, 205, 209, 213, 217, 221, 225, 229, 233, 237, 240, 244, 246, 248, 251, 253, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 127],
        [184, 186, 187, 185],
        [186, 126, 127, 187],
        [126, 186, 184, 182, 180, 178, 176, 174, 172, 170, 168, 166, 164, 162, 160, 158, 252, 250, 249, 247, 245, 241, 236, 232, 228, 224, 220, 216, 212, 208, 204, 200, 194, 196, 146, 144, 142, 140, 138, 136, 134, 132, 130, 128],
        [209, 205, 204, 208],
        [226, 222, 223, 227],
        [188, 189, 190, 191],
        [244, 240, 241, 245],
        [189, 148, 149, 190],
        [213, 209, 208, 212],
        [243, 239, 238, 242],
        [225, 221, 220, 224],
        [210, 206, 207, 211],
        [205, 201, 200, 204],
        [221, 217, 216, 220],
        [218, 214, 215, 219],
        [252, 158, 159, 253],
        [233, 229, 228, 232],
        [214, 210, 211, 215],
        [217, 213, 212, 216],
        [201, 195, 194, 200],
        [248, 246, 247, 249],
        [239, 234, 235, 238],
        [251, 248, 249, 250],
        [229, 225, 224, 228],
        [237, 233, 232, 236],
        [192, 188, 191, 193],
        [195, 197, 196, 194],
        [156, 154, 152, 150, 148, 189, 188, 192, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 239, 243, 255],
        [198, 192, 193, 199],
        [222, 218, 219, 223],
        [250, 252, 253, 251],
        [240, 237, 236, 241],
        [246, 244, 245, 247],
        [255, 243, 242, 254],
        [234, 230, 231, 235],
        [202, 198, 199, 203],
        [230, 226, 227, 231],
        [206, 202, 203, 207],
        [190, 149, 151, 153, 155, 157, 254, 242, 238, 235, 231, 227, 223, 219, 215, 211, 207, 203, 199, 193, 191]
    ]]''')
    prop_verts_mask: StringProperty(default=repr([[True]*256]))
    prop_edges_mask: StringProperty(default=repr([[True]*386]))
    prop_faces_mask: StringProperty(default=repr([[True]*136]))
    
    def functionality(self):
        verts = eval(self.prop_verts)
        edges = eval(self.prop_edges)
        faces = eval(self.prop_faces)
        verts_mask = eval(self.prop_verts_mask)
        edges_mask = eval(self.prop_edges_mask)
        faces_mask = eval(self.prop_faces_mask)
        l = len(verts)
        objects = []
        
        for i in range(0, l):
            bpy.ops.object.add(type = "MESH", align = "CURSOR")
            o = bpy.context.active_object
            o.data.from_pydata(verts[i], edges[i], faces[i])
            for j in range (0, len(verts_mask[i])):
                o.data.vertices[j].select = verts_mask[i][j]
            for j in range (0, len(edges_mask[i])):
                o.data.edges[j].select = edges_mask[i][j]
            for j in range (0, len(faces_mask[i])):
                o.data.polygons[j].select = faces_mask[i][j]
            objects.append(o)
        
        if (l > 0):
            focus_on_object(objects[0])
            if (l > 1):
                for o in objects:
                    o.select_set(True)
                bpy.ops.object.join()

        o = bpy.context.active_object
        o.name = self.inputs["Name"].default_value
        o.data.name = self.inputs["Name"].default_value